package fr.umlv.m2.uwp2011.persistence.matiere;

import java.io.Serializable;
import java.util.Iterator;
import java.util.List;

@SuppressWarnings("serial")
public class Matiere implements Serializable {
	

	private Long id;
	
	private String libelle;
	
	List<String> keywords;
	
	List<TroncCommun> listTroncCommun;
		
	private String descriptif;
	
	
	public String getLibelle() {
		return libelle;
	}
	public void setLibelle(String libelle) {
		this.libelle = libelle;
	}
	public Iterator<String> iteratorKeywords() {
		return keywords.iterator();
	}
	public void setKeywords(List<String> keywords) {
		this.keywords = keywords;
	}
	public String getDescriptif() {
		return descriptif;
	}
	public void setDescriptif(String descriptif) {
		this.descriptif = descriptif;
	}
	
	public Iterator<TroncCommun> iteratorTroncCommun() {
		return listTroncCommun.iterator();
	}
	
	public void setListTroncCommun(List<TroncCommun> listTroncCommun) {
		this.listTroncCommun = listTroncCommun;
	}
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id =id;
	}

	@Override
	public boolean equals(Object obj) {
		if(!(obj instanceof Matiere)) {
			return false;
		}
		Matiere matiere = (Matiere) obj;	
		return matiere.getId() == this.id;
	}
}
